package cn.tedu.boot112.mapper;

import cn.tedu.boot112.entity.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Mapper
public interface UserMapper {
    @Select("select * from user")
     List<User> select();

    @Delete("delete from user where id=#{id}")
     void delete(Integer id);

    @Select("select * from user where id=#{id}")
    User selectinid(Integer id);

    @Update("update user set username=#{username},password=#{password},nick=#{nick} where id=#{id}")
    void update(User user);
}
